package org.shuma.productPriceType.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author :Wjh
 * @since :2024/6/17 下午11:19
 */

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class PriceType implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "ppt_id", type = IdType.AUTO)
    private Long pptId;
    /**
     * 0 - 纯积分
     1 - 积分加钱
     2 - 现金购买
     */
    private Integer pptType;

    /**
     * 现金
     */
    private Integer pptMoney;

    /**
     * 积分
     */
    private Integer pptIntegral;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 是否删除
     0 - 不删除
     */
    @TableLogic
    private Integer isDelete;

    public PriceType(Integer pptMoney, Integer pptIntegral) {
        this.pptMoney = pptMoney;
        this.pptIntegral = pptIntegral;
    }
}
